import request from '@/utils/request';
import Request from 'umi-request';
const CancelToken = Request.CancelToken;


export async function pageComment(projectId, bizType, bizId, params) {
    return request(`/project/${projectId}/comment/${bizType}/${bizId}/page`, {
        params,
    });
}


export async function save(projectId, bizType, bizId, comment) {
    return request(`/project/${projectId}/comment/${bizType}/${bizId}`, {
        method: "POST",
        data: comment,
    });
}

export async function deleteComment(projectId, bizType, bizId, commentId) {
    return request(`/project/${projectId}/comment/${bizType}/${bizId}/${commentId}`, {
        method: "DELETE",
        data: comment,
    });
}